export const toKeyLabel = (obj: Record<any, any>) =>
  Object.entries(obj).map(([key, label]) => ({ key, label }));

// 只保留k为数字
export const enumToObj = (obj: Record<any, any>) =>
  Object.entries(obj).reduce((r, [v, k]) => {
    if (Number.isInteger(k)) {
      // @ts-ignore
      r[k] = v;
    }
    return r;
  }, {});
